namespace ::

entry {
    ShowWindow({
        @use btn = PlainButton('click'),
        @use clicks = Multicasting(DebugTrace('clicks', btn.Clicks)),
        @use box = TextBox(''),
        @use text = Memo(DebugTrace('text', box.Text)),
        @use clicks1 = Label(clicks | reduce(0, { (n,_) => (n + 1) }) | map({ n => n.String })),
        @use clicks2 = Label(clicks | reduce(1, { (n,_) => (n * 2) }) | map({ n => n.String })),
        @use text1 = Label(text),
        @use text2 = Label(text | map(Quote)),
        Window($('Multicast'), Column(
            Row(btn.Widget, clicks1.Widget, clicks2.Widget),
            Row(box.Widget, text1.Widget, text2.Widget)
        ))
    })
}


